Skip to content

Build with GoBob (centralized build/publish)#2

Merged
lvangool merged 1 commit into
masterfrom
hotfix/migrate-to-gobob
Jun 16, 2026
Merged

Build with GoBob (centralized build/publish)#2
lvangool merged 1 commit into
masterfrom
hotfix/migrate-to-gobob

Conversation

@lvangool

Copy link
Copy Markdown
Member

Why

Migrate gotty's release/publish path to GoBob (cloud66's centralized build/publish tool), mirroring morta's hotfix/migrate-to-gobob. Local builds are unchanged; GoBob handles cross-compilation and publishing to downloads.cloud66.com.

Stacked on #1 (Go modules modernization) — GoBob needs that branch's go.mod. This PR's base is hotfix/go-modules-modernization; GitHub will retarget it to master once #1 merges.

What changed

  • .name — GoBob reads the app name (gotty) from this file.
  • main.govar VERSION, BUILDDATE are injected by GoBob's -ldflags; app.Version is overridden when injected, so gotty --version and the Server: header both report the released version, with a fallback to the baked-in version for a plain go build/go install.
  • Makefile — dropped the old dist target; added a gobob target that pins gotty's unix-only target set (it needs a pty, so Windows can't build) and documents the build+push / publish steps.
  • release.yml removed — GoBob owns release/publish now; ci.yml stays as the build gate.

Verified

  • make test clean; all 6 unix targets compile; -X main.VERSION/BUILDDATE flows into gotty --version; plain build falls back to 1.0.1; packaging emits gotty_<ver>_linux_amd64.tar.gz.

Required follow-up (separate — cloud66/central)

GoBob's artifact name/layout differs from what central installs today, so lib/installers/gotty/base.rb must switch to:

  • gotty_<ver>_linux_amd64.tar.gz (was gotty_linux_amd64_<ver_underscored>.tar.gz)
  • binary at gotty_<ver>_linux_amd64/gotty inside the archive (was a bare gotty)

Safe to defer: GoBob pushes don't touch existing artifacts, so servers keep installing the current version until central is flipped.

Migrate gotty's release path to GoBob, mirroring the morta migration.
Local builds are unchanged (make / go build); GoBob owns cross-compile
and publishing to S3.

- add .name (GoBob reads the app name from it)
- inject version via -ldflags into main.VERSION / main.BUILDDATE; override
  app.Version when set so --version and the Server header stay truthful,
  with a fallback to the baked-in version for a plain go build
- Makefile: drop the old dist target; add a `gobob` target that pins the
  unix-only target set (gotty needs a pty, so there is no windows build)
- remove release.yml; GoBob replaces the release/publish path (ci.yml
  stays as the build gate)

Shipping via GoBob changes the artifact name/layout, so cloud66/central's
gotty installer must be updated in lockstep before the new artifacts are
installed. Tracked separately.
@lvangool lvangool changed the base branch from hotfix/go-modules-modernization to master June 16, 2026 09:50
@lvangool lvangool merged commit 94c830e into master Jun 16, 2026
1 check passed
@lvangool lvangool deleted the hotfix/migrate-to-gobob branch June 16, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant